cleaned up with the previously added utility functions.