little code cleanup ... python is not my first choice xD