added code. related to #9