changed properties + cleaned up code