improvements & security checks