initializing array properly