updating Pipe class and adding specs