some trash trying to generalise the type- probably not that useful anyway
slight cleanup