working on space optimization