added global variables instead of hardcode