minor code modifications