code for exploration