after debugging with Martin. Graphics halfway incorporated