reverted to using the previous code, as there was no bug