data modeling and plotting