stack dyanamic array impl.