import last changes from mk01's tree