fixes in Harry's code