Fixed calculations, minified and added example