adding some simple functions to clarify code