working, I need to add optimization