better implementation of share button