coding transformer from scratch