added sword code