abstracted out some stuff