working with types instead of values