add new functions
use new api for '--replace-needed', update build stuff