added factory methods to heap