finish user function