Fixed an error in syntax, also realized I had the function variable in there twice.