use mutable buffer instead of var immutable seq
changed minute counter to array