refactor get bat level