Modified practical03 q01
modified q02 enhance efficiency