First implementation, functionality works, but is not faster