merge simple sharing file code to main code