implemented 'todo's in source code
minor improvements