updates to kamdin.c