Recycling the universe using scalar fields