fixed bugs with parent and added sign <, >