implemented all instructions