use a for-loop instead of if .. elif .. elif ..