without numpy