left and right functions

right is unfinished