adjusted as per comments from @fabpot