made code a bit cleaner