made changes to simplfy code and rename files