simplified version of code, add in modules now