Updated search module to accept rank