cleaned code and added comments about user resources and hashing issue