storing user details with few optimizations