updated version with new interface
updated version with new interface