utilities added. code cleaned. comments added.