use mutable instead of pointer