checkLeft function completed