removed globals, wtf?