Transformer Implementation Phase