main functions works well.