it's fast now, also polished the code :)