Updated check-3 (v0.5 - added code for measuring elapsed time and memory consumption)