adding a user check and also some fixes