first revision
several changes