wrote find free function