working version with style changes