code modified, described in readme