updating files and fixing bugs