added return statements to prevent unwanted execution when debugging