app warmup added
light refactoring, added docstring