basic worked, but it need to optimization