refactored a bit. still working on removing the weird particle drop at the beginning