review code from hellekin comments