check return value