added parameter $tags to restrict the search to given TAGs