Created functions for left- and right-hand cases.