Adding subs functionality