add animation and proper sorting