converted scaling to decibels, removed some unnecessary stuff, amended logging