update setup logic and some refactoring
fix
update gems