added logging and versioning