add sync mode
bug fix
modify energy_cue functions
bug fix
add tests