Resolve #31

Resolve #23

Signed-off-by: David Lu <dvdlu13@gmail.com>