hack to make functions work