break some functionality in smaller fns.