add return value check and be more clear