refactored addBug() and added priorities