main file work