added prompt and check loop'