reduce codes
make another class