New approach to effective teaching of STEM courses in high schools