refactor system and add double buffer