Porting Element to groovy