fixing global func lol