added code to handle penthouse condition