refactoring and use mutable pointers by default