added basic function
fix the basic function