implementei o comando logcat
refactor to make the code more maintainable and solve some silly bugs