changed code structure
changed code structure and license