moved logic to controllers