todo
use swap! instead of reset!
use swap! instead of reset!