wip
use stack instead of heap