add default value for __init__ and update
add attributes length and slope