Implemented filter and reverse functions for list