Added problem and changed main for testing purposes.