added basic check code.