Edited user apply function