trying to merge krist's work