Refactor code second activity