updated to match @komidore64 suggestion