fixing q search function error.
closes #28 #36