implemented active filter and many improvements