improved package search so it takes arguments