cleaner implementation