misc extra refactor