added some code for further implementation of battlesys but doesnt work as of yet