Fixed implementation of givenData