adding merging functionality
fix nil bug
fix nil bug