Moving constant to function