beginning to unify code