some progress on basic function