fixed erronous access logic, did a bit of cleaning