changed search function to accept different search types
deleted uncessary condition in search function.
Merge branch 'master' of https://github.com/cs2103aug2014-t17-2J/main