Took out test code
Error checking