valiated code and removed lines not needed