main still needs work