make code more elegant

remove unwanted code

Signed-off-by: Bryan Lee <leetucksing@gmail.com>