moving form search to seperate daptor function