connected goals to user and wrote methods to sort goals