using also heap