commented gem file for better understanding