attempt to properly scope things. failed