added type mapping stuff + test