added support for weight decay