Daughter has an allegation against her dad. (LONG)

Stephanie
Help. 
I'm currently preg with baby 4. I have 3 kids. Boy 9, girl 6 and girl 4. 
My 6 yr old came to me and asked if she could tell me a secret. I said yes. Then she said was in the bed with her dad and he was on his phone. She was hugging him belly to belly and he took his private out of his underware and held his private in his hand and rubbed it on her stomach on top of her shirt. Said it made her feel uncomfortable and she wanted to leave the room but she closed her eyes and tried to go to sleep, then woke up in the morning in her room. I wasn't home when she says this occurred because I'm in night school from 5:30-9:30pm. 
I confronted my spouse right away and he said he was in the bed in his boxers because he was going to shower he was surfing the Internet and then decided not to shower and daughter was asleep in our bed so he picked her up and moved her to her bed. 
Then over the next 4 days I've questioned more and more and more of the story has came out from him. He now says yes he was in the bed in his boxers and she was at the end of the bed asleep. He was watching porn and going to masterbate. She rolled next to him and hugged him so he moved her back away from him and continued to watch the porn on his phone. Then she moved closer again and that's when he stopped and moved her to her room. 
That he wasn't rubbing it out but he did have his hand on his penis. 
That he never touched her with it and wouldn't. But her story says he did. She is very advanced and mature for her age. I don't believe she would just make something up like that. Now I know I need to leave I know I need to protect my kids but I'm so lost and confused. And I told him why didn't he come out and say the whole story from the get go? Why hide info? And all he says is because he knew that either way the information came out would sound bad. Swears he didn't touch her and never would do anything like hat to any of his kids. I told him I feel like I need to leave and I believe my child and he has just said he knows he F"Ed up and he shouldn't have been doing that with her in the bed, and that he will take the conciquences of whatever that may be.
He does have a history of abuse that has happened to him as a child. 
I have no job, no Car in my name. My best friend said I can move in with her but she's a full time working single mom of 4 and really doesn't have the room in her house for us.