u/danielw/dm-1395

Creating PR for reviewing DM-1395
I'm totally OK if you say this is the best/only way to do it. I think it already asks for some improvement, but I'm not ready to do anything about it yet, the ticket has to wait for now :)