Added an apply which is not working as expected yet.