modify for a simplier solution