split out some main methods