basic function done. (without register user)