some testing code and libraries