This is so horrible for code readability but have done it for consistency anyway