Optimazed it a bit