fixed some issues & added a new array init