added sorting of actions

added functions into filterSongs
added priorities to queries