combine all function to be one