tests implemented, minor improvements