complete prompt and  fix bugs