Refactored codes

Signed-off-by: Kim Seonghyun <shyeon.kim@scipi.net>