Refacted method, added dashed and color property.
Added animation duration property.