fixed flow of status
changed flow of setup