Using imagination to achieve goals