updated to do basic dependancy resolution