try to reorganize gates into set of wrappers