porting weapon line by line