added version_code and logging changed a bit