added objective check function