trying to fix scope issue