avoid extra mallocing and initializing