Tested and integrated version