Crate training will help. If he is not directly supervised, he should be in a crate. Hook a leash to your belt and never let him out of your sight. If he doesn't go whe you have him out on a leash, place him in the crate immediately when you reenter the house, wiat 5 minutes and take him out again. When he does go outside, immediately give him a treat and praise him. Be sure to give him plenty of time when outdoors. When he does have accidents in the house, do not rub his nose in it or scold him. If you do not catch him in the act, do not scold him at all. He will not make the connection and will become fearful of you. If you catch him in the act, startle him to get him to stop and take him outside to the area that you want him to go. Remember, NEVER let him out of your sight when indoors. Do not give him the opportunity to have accidents.