updated prototype impl