need to clean up code but works