all code and costas factory added