code optimization, bugs, improvements