added daemon process and finished assign_user method