added only max filter
split function to blocks