fixed some formulations and removed a debug statement