added getter for dimension values
made training and running function templates