add tests and fixed types in metadata