small improvements and no console.logging