add error check
cleanup
add dependency resolution functionality