finished re-implementation (elements checker)