refactored into two separate apps