merge back with nico's branch