minor improvements in return values, still lots to do