more concise functions and somewhat adapted tests