put back check in main