update with working and tested version