put in a sum_all function and also shifted to using config.floatX everywhere