reuse more code by sharing handler