got rid of silly globals