included tests and fixes