speed tests and more helper functions