more complete and correct hack