updated function names to be more clear