2.1 added t as input, 2.2 corrected