make some minor changes as @dblock suggested. : )