added reset button, fixed array init