implementation of some instructions