data is filtered and formatted