split some of the core functions for easier maintenance