cleaned up analysis