moved functionality out of controller