working with backend and rendering html
added decrements & limits; clenaup a bit the code