Removed useless code (function which wasn't actually needed)