re-arranged methods for better readability