refactoring to use castor-load