more instructions + refactoring