Update

add console.log;
combined second and third variants;