improving types and specs