finish implementation of stack frames and add test