Added functions from source