Scaling on inputs. Done in a roundabout fashion -- todo fix later