removed unnecessary legacy code for better readbility
clean up code