The bible is a contentious book, it must be read in context. Atheists are often, on this site, accused of not doing this although it must be said not recently.
Now the story goes that God is perfect and we receive our morals from him. All fair and well until you start to ask about the unmoral things like genocide and slavery (not indentured service but slavery) that God told his people to do (in other words this has nothing to do with free will). This is one of the parts that apologists start to say that we are reading the bible out of context.
So today I’m giving the Christians a chance to explain to us in what context can slavery and genocide be considered moral. Oh one thing to keep in mind is you should not say that the Old Testament is not relevant because of the new covenant; if you do that then you are also throwing things like the Ten Commandments away.