Complete
reduced code. made it more efficient