Qualified education expenses

I owed federal $2200 I filed exempt too many times in 2016. I was scared. I thought my son could help. I claimed him as my dependant. He lives with me I provide for him. He attends college. He qualified for the American Opportunity Credit. He was awarded $2500 . That cleared my debt of $2200 and still gave me a credit of $300. Was this all okay to do ? This is my 1st time doing this while he is in college. Please help.