there's probably so much redundancy in my code