renamed a function for clarity