fixed NSLog bug and added opacity setting