optimized, removed sort

add energy map remake test, removed unnecessary sort