some changes in reply to @Gama11 and @gamedevsam notes