moving shared code