Added updating filtered function
Bug fixed