use stack instead of heap