implemented average blocks