add side as another priority param, removed unused method, fix mistype