added keys, reduced capturing