fixed code size and removed dir() api