complete functionality ready but messy