added assignments and comparison