bug fixes, passing on stack working