got rid of unnecessary code