buggy function removed