the basical function done