work in progress - modularizing various elements