refactoring and new bash script commands