implemented comparator output