removed filter calculation by middle value