Added range in search function