Changed: Slightly improved code