added control class, semua fungsi logical taruh di sana ya, biar gampang unit testingnya