filterpack improved with functions and procedures