refactored to use css translations, changed the example