added search function still incomplete