added functionality to filter only for desired attributes