implemented alex' modifications, testing...