Adding SGD variant
Added optimized verion of SGD