adding versioning and fixing bugs