added birthday sorting and added query to controller