improve tests and readibility