algorithm v0.3 - add smartify function