maybe better optimizations, remove unused file