Added (ugly) code for consult mode, should definitely be changed after
project was submitted in the lesson