added return values for clarity