finally figured out function find