added some stuff from makeR