Sharing

Fixes #15.
You can simplify and use else if () directly here