Fixes #3 plus improving function name to avoid future problems