add references, fix type