started modifying begin loop function
added functions to modify the position of the codepointer