moved more logic to front app