share logic