Removed unused check() function