second commit with cleaner organized code