fixed scope errors and basic testing