Failed attempt at sharing variables