Applying the resources framework of teaching and learning to issues in middle school physics instruction on energy