Cleaned up code  was printing json