added a few small helper functions