starting an optimization, but first... let me make a pull
merged
trying some optimizations
small bugs