hopefully fix scoping issue