updated to do simple dependancy resolution