updated functions to make file more readable