apt fix and new function