finish the code basic function ;