implemented issue 4