implemented multi-user function