removed some code and added more