refactor for better readability
refactor to a bigger application