added dependency check. fixed bugs in parameter interpretation