add return value check.