modified. still not organized well...