Updated script to look a bit cleaner