solved through problem #3