better separation of function definitions