add function to check if battling