moved get elements to constructor