general programming and tests