moved definitions out