functions starting with test_ are functional tests