removing code duplication
adding README