move more logic to services