moved main block to main function