refactor for better stability + added bashdown templating