changed method signatures for better understanding.