submitting partial cleaned up code for testing purposes