Added toggle funtionality.