priority added + some fixes