first example
merge development
rearranged if conditions

If indentation is 4 chars then this arrangement looks better.