Modifying Stairs - Beginner

hello i have found a tutorial for building a pretty generic form of stairs in grasshopper. now my aim is to fit it to the exact measurements of my building’s design

here is the code (14.1 KB)

this is what it looks like

it actually works fine but what im trying to do is to make the stairs in one piece and to have flat surfaces that go along the floor. sort of like this

i’m an architecture student and not very involved in coding, it would be cool to find a simple way as how to do this.

thank you very much in advance