moved logging and validation to services