updated pretty much all the code with all the features included