added new functions

added add resources
added on create user add 20 resources
cleaned the code