clean up code
relates #88