updates_4

updated and slight modificaiton of code, made is look pretty by making
functions for each tasks.....