bug fixing and code improvment
version 1.0.2