Added up, down, left and right functions.