fix the function to be semantic
minor style adjustments
major info commit.