Similar to code below.