added find function to main