thanks cory for fixing my crappy PHP