refactored to separate project