Actually, we can just remove the function and do it in here, also avoids having to pass in `$container`